<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!-- <header id="header" class="navbar navbar-default header--fixed hide-from-print animated slideDown" role="navigation"> -->
<header id="header"  class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">简洛订餐系统<span style="font-size: 12px;">V0.1</span></a>
    </div>
    <div class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li <c:if test="${menuName=='InitUserIndex' }">class="active"</c:if>><a href="InitUserIndex.nut">首页</a></li>
        <c:if test="${user != null && 'admin' == user.userid}">
        <li <c:if test="${menuName=='OrdersCalendarManager' }">class="active"</c:if>><a href="OrdersCalendarManager.nut">订单管理</a></li>
        <li <c:if test="${menuName=='UserManager' }">class="active"</c:if>><a href="UserManager.nut">用户管理</a></li>
        <li <c:if test="${menuName=='ShopManager' }">class="active"</c:if>><a href="ShopManager.nut">店铺管理</a></li>
        <li <c:if test="${menuName=='' }">class="active"</c:if>><a href="#about">关于我们</a></li>
        </c:if>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <c:if test="${user == null }">
	        <li><a href="#" id="login" data-toggle="modal" data-target="#loginModal">登陆</a></li>
	        <li><a href="#" data-toggle="modal" data-target="#registerModal" >注册</a></li>
        </c:if>
        <c:if test="${user != null }">
            <li><a href="MyOrder.nut">我的订单</a></li>
            <li><a href="Logout.nut">退出</a></li>
        </c:if>
      </ul>
    </div>
  </div>
</header>

<script type="application/javascript" >
//     $(function (){ 
//         var header = new Headroom(document.querySelector("#header"), {
//             tolerance: 5,
//             offset : 50,
//             classes: {
//               initial: "animated",
//               pinned: "bounceInDown",
//               unpinned: "bounceOutUp"
//             }
//         });
//         header.init();
//     });
</script>